﻿@model IEnumerable<Sigavat.Entities.Promotor>

@{
    ViewBag.Title = "Index";
}

<fieldset>
    <legend>Buscar Promotor</legend>
    @using (Html.BeginForm())
    { 
        <b>Criterio:</b>
        @Html.TextBox("criterio")
        <input type="submit" name="btnBuscar" class="btn btn-success btn-sm" value="Buscar" />
    }
</fieldset>

<div class="panel panel-primary">
    <div class="panel-heading">
        <h2>Inicio</h2>
        <p>
            @Html.ActionLink("Nuevo", "Create")
        </p>
    </div>
    <div class="panel-body">
        



<table class="table table-striped table-hover">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Nombres)

            @*@Html.DisplayNameFor(model => model.ApPaterno)

            @Html.DisplayNameFor(model => model.ApMaterno)*@
        </th>
        <th>
            @Html.DisplayNameFor(model => model.CodigoPromotor)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.NumPromotor)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Ubigeo)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.CentroComercial.NombreCentroC)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Dni)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Telefono)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Email)
        </th>
        <th colspan="2"></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Nombres)
           @Html.DisplayFor(modelItem => item.ApPaterno)
            @Html.DisplayFor(modelItem => item.ApMaterno)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CodigoPromotor)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.NumPromotor)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Ubigeo)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CentroComercial.NombreCentroC)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Dni)
        </td>
        
        <td>
            @Html.DisplayFor(modelItem => item.Telefono)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Email)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Details", "Details", new { id=item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })
        </td>
    </tr>
}

</table>
    </div>
</div>